Skip to content

Run endings: judged on the whole run's work, one writer per PR branch, specific questions, option tests - #352

Merged
nambok merged 1 commit into
mainfrom
run-end-whole-work
Oct 28, 2026
Merged

nambok merged 1 commit into
mainfrom
run-end-whole-work

Conversation

@nambok

@nambok nambok commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

A new-feature run built fourteen files over three steps; its fourth step wrote nothing, and the run ended as "I ran but produced no file changes" with two generic questions, although the branch held the work and the ticket named every file. The same run worked the open pull request of an earlier run of the ticket while that run's feedback pass was writing the same branch. This makes a run's ending judge its whole work, keeps one writer per pull request branch across runs, asks only specific questions, and adds the one missing new-feature test rule.

Changes

  • Whole-run judgment (passes/run_end.rs, passes/mod.rs): a step that writes no file is judged on the branch's diff against its base, minus the plan files. With work there, the run goes on to the plan check and the pull request. With nothing on the branch and a plan that names its files, it builds once more, told every task. After that it asks only a question the coder wrote naming the file, field or option it couldn't decide, or stops naming the planned tasks not built. The two generic questions remain only when neither the ticket nor the plan names a file. The multi-repo path judges the same way.
  • Generated files and stalls (passes/plan_coverage.rs): plan tasks for files a detected generator writes (or that the plan says are regenerated) no longer hold the plan check. The generator check already runs the generator before the pull request and blocks it when the output is out of date. A step that wrote nothing and whose rounds moved nothing stops with the tasks left and why, instead of starting another identical step.
  • Branch start (clients/github.rs, passes/mod.rs): start_branch reports created, reset, or kept for an open pull request, and the progress note says which (it said "Created branch" in every step while keeping the pull request's head). A continuation keeps its branch when it has an open pull request too. A failed open-PR lookup no longer reads as "no PR" and resets the branch. keep_wip_branch never moves a WIP branch that holds commits the run branch doesn't (a fix round's); it keeps the work on a branch of its own.
  • One writer per pull request branch (passes/pr_holder.rs, passes/mod.rs): before a run works on an earlier run's open pull request (found as the ticket's own open PR at the start, or as the open PR on the run's branch), it reads that run fresh. While that run is still working (queued, running, waiting for CI, a writer pass under way, or a fix round under way or parked), the new run stops before writing anything. It ends as covered by that pull request, with a run-page note naming the pull request and the run, and Retry continues it later. Once the earlier run is done, the new run says on the run page that it continues that pull request as its update, and holds the earlier run's writer slot while it works, so a feedback or CI pass of that run waits instead of writing the same branch. stop_gate::existing_work keeps skipping CoderHelm's own pull requests: for a retry, the own PR is the work to continue, never "someone else's work that covers this".
  • Tests for each option (passes/feature/checklist.rs, passes/feature/mod.rs): the new-feature checklist gains "tests for each option". Each new option list (list:/options: with value: keys or plain strings), string-literal union prop, and on/off field (type: 'boolean') in the diff's source files must have every value (both the shown and the hidden case for on/off) named in the tests the change adds or changes. A miss fails the item and the fix round is told which values.

Already enforced, unchanged:

  • A new end-to-end spec listed in every test map the repo keeps: feature/checklist.rs missing_from_test_maps, a failing checklist item that gets a fix round.
  • The repo's own type-check, lint and unit tests, plus the new spec run repeatedly, before the PR: feature/checklist.rs root_steps, run by feature/mod.rs sandbox_items; a failure keeps the PR a draft.
  • Generated files in the diff: generators.rs gate regenerates and commits them, and blocks the PR when inputs changed and outputs didn't.

Verification

  • cargo fmt --all --check: clean
  • cargo clippy --workspace --all-targets -- -D warnings: clean
  • cargo test --workspace: 1276 + 605 + 925 + 2 passed, 0 failed
  • New tests: the empty step on a branch holding the work carries on; plan files alone are no work; a ticket that names its files never gets the generic questions; the coder's own question is asked; generated-file tasks never hold the plan check; the stop reason says why and stays within the record limit; branch notes say what happened; a WIP branch with its own commits is never moved; a completed run whose feedback pass holds its writer slot is busy, and so are working statuses and live rounds; the runs that opened a pull request are found; every value of a new option list, union and on/off field must be named in a test.

…, specific questions, option tests

A new-feature run built fourteen files over three steps, then its fourth
step wrote nothing and the run ended as "I ran but produced no file
changes" with two generic questions, although the branch held the work and
the ticket named every file. It had also worked the open pull request of an
earlier run of the same ticket while that run's feedback pass was writing
the same branch.

- A step that writes no file is judged on the branch's diff against its
  base (every step's work, without the plan files): with the work there,
  the run goes on to the plan check and the pull request. With nothing on
  the branch and a plan that names its files, it builds once more, told
  every task; then it asks only a question the coder wrote naming what it
  couldn't decide, or stops naming the planned tasks not built. The two
  generic questions remain only for a ticket and plan that name no file.
- Planned tasks for files a code generator writes no longer hold the plan
  check: the generator check runs the generator before the pull request.
  A step that wrote nothing and whose rounds moved nothing stops naming the
  tasks left instead of starting another identical step.
- Branch start says what happened (created, reset, or kept for an open pull
  request) instead of "Created branch" in every step; a continuation keeps
  its branch with an open pull request too; a failed open-PR lookup never
  resets a branch; a WIP branch holding other commits is never moved.
- A run about to work on an earlier run's open pull request reads that run
  fresh: while it is still working (running, waiting for CI, a writer pass
  or a fix round), the new run stops before writing, naming the pull
  request and the run; once it is done, the new run continues the pull
  request as its update and holds that run's writer slot meanwhile.
- New-feature checklist: every value of each new option the change adds
  (an option list, a string-literal union, the shown and hidden case of an
  on/off field) must be named in a test, or the item fails and the fix
  round is told which.
@nambok
nambok merged commit 4361fda into main Oct 28, 2026
8 checks passed
@nambok
nambok deleted the run-end-whole-work branch October 28, 2026 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant